package com.github.baichuan.iot.gateway.telecontrol;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Map;

/**
 * 控制命令信息
 */
@Getter
@Setter
@ToString
public class Command {
    @NotBlank(message = "设备编码不能为空")
    private String device;

    @NotBlank(message = "命令代码不能为空")
    private String code;

    private Map<String, String> params;

    @NotNull(message = "超时时间不能为空")
    private Integer timeout;

    @NotBlank(message = "追踪ID不能为空")
    private String traceId;
}
